<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>我的医护</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/iconfont.css" />
		<link rel="stylesheet" href="../css/main.css" />
		<style>
			body,
			html {
				overflow: hidden;
				height: 100%;
			}
			/* DEMO 3 */
			
			.wrapper-dropdown-3 {
				/* Size and position */
				position: relative;
				width: 25%;
				margin: 0 auto;
				padding: 10px;
				/* Styles */
				background: #fff;
				border-radius: 7px;
				border: 1px solid rgba(0, 0, 0, 0.15);
				box-shadow: 0 1px 1px rgba(50, 50, 50, 0.1);
				cursor: pointer;
				outline: none;
				/* Font settings */
				font-weight: bold;
				color: #8AA8BD;
				font-size: 12px;
			}
			
			.wrapper-dropdown-3:after {
				content: "";
				width: 0;
				height: 0;
				position: absolute;
				right: 15px;
				top: 50%;
				margin-top: -3px;
				border-width: 6px 6px 0 6px;
				border-style: solid;
				border-color: #8aa8bd transparent;
			}
			
			.wrapper-dropdown-3 .dropdown {
				/* Size & position */
				position: absolute;
				top: 140%;
				left: 0;
				right: 0;
				/* Styles */
				background: white;
				border-radius: inherit;
				border: 1px solid rgba(0, 0, 0, 0.17);
				box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
				font-weight: normal;
				-webkit-transition: all 0.5s ease-in;
				-moz-transition: all 0.5s ease-in;
				-ms-transition: all 0.5s ease-in;
				-o-transition: all 0.5s ease-in;
				transition: all 0.5s ease-in;
				list-style: none;
				/* Hiding */
				opacity: 0;
				pointer-events: none;
				z-index: 1;
			}
			
			.wrapper-dropdown-3 .dropdown:after {
				content: "";
				width: 0;
				height: 0;
				position: absolute;
				bottom: 100%;
				right: 15px;
				border-width: 0 6px 6px 6px;
				border-style: solid;
				border-color: #fff transparent;
			}
			
			.wrapper-dropdown-3 .dropdown:before {
				content: "";
				width: 0;
				height: 0;
				position: absolute;
				bottom: 100%;
				right: 13px;
				border-width: 0 8px 8px 8px;
				border-style: solid;
				border-color: rgba(0, 0, 0, 0.1) transparent;
			}
			
			.wrapper-dropdown-3 .dropdown li a {
				display: block;
				padding: 10px;
				text-decoration: none;
				color: #8aa8bd;
				border-bottom: 1px solid #e6e8ea;
				box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1);
				-webkit-transition: all 0.3s ease-out;
				-moz-transition: all 0.3s ease-out;
				-ms-transition: all 0.3s ease-out;
				-o-transition: all 0.3s ease-out;
				transition: all 0.3s ease-out;
			}
			
			.wrapper-dropdown-3 .dropdown li i {
				float: right;
				color: inherit;
			}
			
			.wrapper-dropdown-3 .dropdown li:first-of-type a {
				border-radius: 7px 7px 0 0;
			}
			
			.wrapper-dropdown-3 .dropdown li:last-of-type a {
				border: none;
				border-radius: 0 0 7px 7px;
			}
			/* Hover state */
			
			.wrapper-dropdown-3 .dropdown li:hover a {
				background: #f3f8f8;
			}
			/* Active state */
			
			.wrapper-dropdown-3.active .dropdown {
				opacity: 1;
				pointer-events: auto;
			}
			/* No CSS3 support */
			
			.no-opacity .wrapper-dropdown-3 .dropdown,
			.no-pointerevents .wrapper-dropdown-3 .dropdown {
				display: none;
				opacity: 1;
				pointer-events: auto;
			}
			
			.no-opacity .wrapper-dropdown-3.active .dropdown,
			.no-pointerevents .wrapper-dropdown-3.active .dropdown {
				display: block;
			}
			
			#uptab {
				width: 100%;
			}
			
			.mui-fullscreen {
				top: 45px;
			}
			
			.mui-fullscreen .mui-segmented-control~.mui-slider-group {
				top: 100px;
			}
			
			.mui-control-content {
				height: 500px;
				height: 85vh !important;
			}
			
			.mui-ios .mui-table-view-cell {
				-webkit-transform-style: preserve-3d;
				transform-style: preserve-3d;
				margin-top: 3px;
			}
			
			.mui-table-view .mui-media-object {
				line-height: 90px;
				max-width: 90px;
				height: 90px;
			}
			
			.mui-media-body ul li {
				list-style: none;
			}
			
			.mui-table-view-cell:after {
				position: absolute;
				right: 0;
				bottom: 0;
				left: 0px;
				height: 1px;
				content: '';
				-webkit-transform: scaleY(.5);
				transform: scaleY(.5);
				background-color: #D9D9D9;
			}
			
			.shanchang {
				font-size: 15px;
				color: #333333;
				font-weight: bold;
				white-space: normal!important;
				list-style: none;
			}
			
			.nei {
				font-size: 14px;
				color: #333333;
				font-weight: 100;
			}
			
			.mui-table-view .mui-media,
			.mui-table-view .mui-media-body {
				overflow: hidden;
				line-height: 1.5;
			}
			
			.mui-bar .mui-btn.mui-pull-right {
				margin-left: 10px;
				background-color: #ffffff;
				color: #333333;
				margin-top: 12px;
				text-align: center;
				width: 67px;
				line-height: 20px;
			}
			
			.iconfont {
				font-size: 8px;
				color: #CF2D28;
				padding-right: 10px;
				font-family: "iconfont" !important;
				font-size: 16px;
				font-style: normal;
				-webkit-font-smoothing: antialiased;
				-moz-osx-font-smoothing: grayscale;
			}
			
			.wutu {
				text-align: center;
				padding-top: 1.8rem;
				background: transparent;
			}
			
			.head-img {
				max-width: 70px;
				max-height: 70px;
				background-size: 100% 100%;
				display: inline-block;
				position: relative;
				border-radius: 50%;
				margin-left: 10px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">我的医护</h1>
			<!--<button class="mui-btn mui-btn-blue mui-btn-link mui-pull-right" id="add_yihu">添加医护</button>-->
		</header>
		<div class="mui-content">
			<div class="mui-slider-group">
				<div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
					<div id="scroll" class="mui-scroll-wrapper">
						<div class="mui-scroll item0_0">
							<ul class="mui-table-view tableUL" id="tableUL">

							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script type="text/javascript" src="../js/xiangyingshi.js"></script>
	<script type="text/javascript" src="../js/jquery-3.1.1.min.js"></script>
	<script type="text/javascript" src="../js/arttmpl.js"></script>
	<script type="text/javascript" src="../js/constants.js"></script>

	<script type="text/javascript" src="../plugs/moment/moment.min.js"></script>
	<script type="text/javascript" src="../js/art/template-web.js"></script>
	<script type="text/javascript" src="../js/qs/qs.art.extend.js"></script>
	<script type="text/javascript" src="../js/qs/qs.template.js"></script>
	<script type="text/javascript" src="../js/iscroll/iscroll-probe.js"></script>
	<script type="text/javascript" src="../js/qs/qs.iscroll.js"></script>
	<script>
		var service_item_JSON = [];
		var selectItem = '';
		var yihu_messsage_JSON = [];
		mui.plusReady(function() {
			if(plus.navigator.isImmersedStatusbar()) { // 兼容immersed状态栏模式
				// 获取状态栏高度并根据业务需求处理，这里重新计算了子窗口的偏移位置
				topoffset = (Math.round(plus.navigator.getStatusbarHeight()) + 45) + 'px';
				document.querySelector("header").style.height = topoffset;
				document.querySelector("header").style.paddingTop = "20px";
				document.querySelector(".mui-bar-nav~.mui-content").style.paddingTop = topoffset;
			}
			// 加载完毕后关闭等待框，并展示页面
			var currentView = plus.webview.currentWebview();
			currentView.show('slide-in-right', 200);
			plus.nativeUI.closeWaiting();
			var url = serverAddress + "/api/patient/getmydoctor";
			var success = function(data) {
				console.log("医护列表" + JSON.stringify(data));
				if(data.data != "") {
					//service_item_JSON = data.data[0].project;
					yihu_messsage_JSON = data.data;
					$("#tableUL").processTL(templateRegister.docLIST, {
						doc_sub: yihu_messsage_JSON
					}, "append", function() {});

				} else {
					document.querySelector(".item0_0").innerHTML = '<div class="mui-content-padded wutu"><img src="../images/no_data/1-01.png" style="width: 150px;"></div>';
				}
			};
			commonHttpUtils(url, "get", {}, success, error, true);
		});
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});
		mui('#scroll').scroll({
			indicators: true //是否显示滚动条
		});
		/*下拉选择框*/
		function DropDown(el) {
			this.dd = el;
			this.placeholder = this.dd.children('span');
			this.opts = this.dd.find('ul.dropdown > li');
			this.val = '';
			this.index = -1;
			this.initEvents();
		}
		DropDown.prototype = {
			initEvents: function() {
				var obj = this;

				obj.dd.on('click', function(event) {
					$(this).toggleClass('active');
					return false;
				});

				obj.opts.on('click', function() {
					var opt = $(this);
					obj.val = opt.text();
					obj.index = opt.index();
					obj.placeholder.text(obj.val);
				});
			},
			getValue: function() {
				return this.val;
			},
			getIndex: function() {
				return this.index;
			}
		}

		$(function() {
			var dd = new DropDown($('#dd'));
			var dd = new DropDown($('#dd2'));
			var dd = new DropDown($('#dd3'));
			var dd = new DropDown($('#dd4'));
			$(document).click(function() {
				// all dropdowns
				$('.wrapper-dropdown-3').removeClass('active');
			});

		});
		//添加医护
		//		document.getElementById("add_yihu").addEventListener("tap", function(e) {
		//			mui.openWindow({
		//				url: 'add_yihu.html',
		//				id: 'add_yihu',
		//				show: {
		//					autoShow: false, //页面loaded事件发生后自动显示，默认为true
		//					event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
		//				},
		//				waiting: {
		//					autoShow: true //自动显示等待框，默认为true
		//				}
		//			});
		//		})
		//护士详情
		mui(".item0_0").on("tap", "a", function(e) {
			mui.openWindow({
				url: 'hushi_xiangqing.html',
				id: 'hushi_xiangqing.html',
				show: {
					autoShow: false, //页面loaded事件发生后自动显示，默认为true
					event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
				},
				waiting: {
					autoShow: true //自动显示等待框，默认为true
				},
				extras: {
					YIHU_ID: this.id,
					//SERVICE_ITEM_ARRAY: service_item_JSON
					YIHU_MESSAGE: yihu_messsage_JSON
				}
			});
		});

//		{
//			"result": "success",
//			"data": [{
//				"userfaceimage": "client\\assets\\uploads\\single-file-1520560495467.jpg",
//				"lovevalue": 227,
//				"idapprove": "2",
//				"dtype": "nurse",
//				"_id": "5a010c5084e3aa0699b3651d",
//				"name": "测试",
//				"hid": {
//					"_id": "59ba424617fba05493a1c753",
//					"name": "吉大一院"
//				},
//				"deptId": {
//					"_id": "5a5418aca961603d47ad8aa2",
//					"name": "科室二"
//				}
//			}, {
//				"userfaceimage": "\\assets\\images\\txmrt.png",
//				"lovevalue": 187,
//				"idapprove": "2",
//				"dtype": "doctor",
//				"_id": "5ab853875e2b451320853a4a",
//				"name": "123456",
//				"hid": {
//					"_id": "59ba424617fba05493a1c753",
//					"name": "吉大一院"
//				}
//			}]
//		}
	</script>

</html>